Skip to content

Instantly share code, notes, and snippets.

@denguir
denguir / cuda_install.md
Last active May 13, 2024 14:05
Installation procedure for CUDA & cuDNN

How to install CUDA & cuDNN on Ubuntu 22.04

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation

@mdang
mdang / RAILS_CHEATSHEET.md
Last active May 13, 2024 14:04
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before

@satmandu
satmandu / make_current_arm64_rpi_kernel_debs.sh
Last active May 13, 2024 14:03
Make arm64 deb packages for the offical Raspberry Pi Foundation arm64 kernels, tested with ubuntu 23.04
#!/bin/bash -x
# make_arm64_rpi_kernel_debs.sh
# Builds arm64 debian packages from the CURRENT rpi firmware repository kernel which is installed by:
# sudo rpi-update
# This runs on an arm64 host with arm64 compilation tools...
# or with some sort of cross-compilation setup.
# Debs are put in $workdir/build
#
# This will NOT work in Raspbian unless you have an arm64 compilation
# environment setup. Appears to work on
@whitingx
whitingx / meta-tags.md
Created October 5, 2012 16:41 — forked from kevinSuttle/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
C:\Program Files\Notepad++\notepad++.exe -n%line% "%path%"
@paulirish
paulirish / how-to-view-source-of-chrome-extension.md
Last active May 13, 2024 14:02
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@Semnodime
Semnodime / kmeansExample.py
Last active May 13, 2024 14:02 — forked from iandanforth/kmeansExample.py
A pure python3 compatible implementation of K-Means clustering. Optional cluster visualization using plot.ly.
"""
This is a pure Python3 implementation of the K-means Clustering algorithm.
It is based on a GitHub Gist which uses Python2:
https://gist.github.com/iandanforth/5862470
I have refactored the code and to assure the code obeys Python Enhancement Proposals (PEPs) rules.
After reading through this code you should understand clearly how K-means works.
This script specifically avoids using numpy or other more obscure libraries.
It is meant to be *clear* not fast.
I have also added integration with the plot.ly plotting library.
So you can see the clusters found by this algorithm. To install plotly run:
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 13, 2024 14:01
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@jonasraoni
jonasraoni / Flattener.cs
Created July 14, 2018 14:46
Flatten Array in C#
using System;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Extends the Array with the Flatten method
/// </summary>
public static class Flattener {
/// <summary>
/// Given a N-dimensional array, flattens it into a new one-dimensional array without modifying the elements' order